﻿export default [
    {
        path: '/user',
        layout: false,
        routes: [
            {
                name: 'login',
                path: '/user/login',
                component: './user/Login',
            },
            {
                component: './404',
            },
        ],
    },
    {
        path: '/dashboard',
        name: '工作台',
        access: 'canAdmin',
        component: '@/layouts/dashboardLayout',
        wrappers:['@/wrappers/auth'],
        routes: [
            {
                path: '/dashboard',
                redirect: '/dashboard/home',
            },
            {
                path: '/dashboard/home',
                name: '首页',
                icon: 'HomeOutlined',
                component: './Dashboard/Home',
            },
            {
                path: '/dashboard/knowledge',
                name: '知识管理',
                icon: 'DatabaseOutlined',
                routes: [
                    {
                        path: '/dashboard/knowledge',
                        redirect: '/dashboard/knowledge/my',
                    },
                    {
                        path: '/dashboard/knowledge/my',
                        name: '我的知识',
                        icon: 'ReadOutlined',
                        component: './Dashboard/Knowledge',
                    },
                    {
                        path: '/dashboard/knowledge/create/:type',
                        name: '知识创建',
                        hideInMenu: true,
                        component: './Dashboard/Knowledge/create',
                    },
                    {
                        path: '/dashboard/knowledge/edit/:type/:kid',
                        name: '知识编辑',
                        hideInMenu: true,
                        component: './Dashboard/Knowledge/create',
                    },
                    {
                        path: '/dashboard/knowledge/apply',
                        name: '申请管理',
                        icon: 'UnlockOutlined',
                        component: './404',
                    },
                    {
                        path: '/dashboard/knowledge/comment',
                        name: '评论管理',
                        icon: 'CommentOutlined',
                        component: './404',
                    },
                ],
            },
            {
                path: '/dashboard/center',
                name: '个人中心',
                icon: 'SettingOutlined',
                routes: [
                    {
                        path: '/dashboard/center/user',
                        name: '个人中心',
                        icon: 'UserOutlined',
                        component: './404',
                    },
                    {
                        path: '/dashboard/center/team',
                        name: '我的团队',
                        icon: 'TeamOutlined',
                        component: './404',
                    },
                    {
                        path: '/dashboard/center/safe',
                        name: '安全设置',
                        icon: 'SafetyCertificateOutlined',
                        component: './user/SetPassword',
                    },
                    {
                        path: '/dashboard/center/history',
                        name: '浏览记录',
                        icon: 'HistoryOutlined',
                        component: './404',
                    },
                ],
            },
            {
                path: "/dashboard/system",
                name: "系统管理",
                icon: "SettingOutlined",
                routes: [
                  {
                    path: "/dashboard/system/user",
                    name: "用户管理",
                    icon: "UserOutlined",
                    component: './Dashboard/System/User',
                  },
                  {
                    path: "/dashboard/system/user/details/:id",
                    name: "用户详情",
                    hideInMenu: true,
                    component: './Dashboard/System/User/Detail',
                  },
                  {
                    path: "/dashboard/system/office",
                    name: "部门管理",
                    icon: "ApartmentOutlined",
                    component: './Dashboard/System/Office',
                  },
                  {
                    path: "/dashboard/system/role",
                    name: "角色管理",
                    icon: "SolutionOutlined",
                    component: './Dashboard/System/Role',
                  },
                  {
                    path: "/dashboard/system/permission",
                    name: "权限管理",
                    icon: "LockOutlined",
                    component: './Dashboard/System/Permission',
                  },
                  {
                    path: "/dashboard/system/knowledgeTemplate",
                    name: "知识模板定义",
                    icon: "LockOutlined",
                    component: './404',
                  },
                  {
                    path: "/dashboard/system/approvalProcess",
                    name: "审批流配置",
                    icon: "RetweetOutlined",
                    component: './404',
                  },
                  {
                    path: "/dashboard/system/log",
                    name: "日志管理",
                    icon: "ProfileOutlined",
                    component: './Dashboard/System/Log',
                  },
                  {
                    path: "/dashboard/system/message",
                    name: "消息管理",
                    icon: "MessageOutlined",
                    component: './404',
                  },
                  {
                    path: "/dashboard/system/blockChain",
                    name: "区块链看板配置",
                    icon: "LayoutOutlined",
                    component: './404',
                  },
                  {
                    path: "/dashboard/system/dictionary",
                    name: "字典管理",
                    icon: "ReadOutlined",
                    component: './404',
                  },
                  {
                    path: "/dashboard/system/menu",
                    name: "菜单管理",
                    icon: "BarsOutlined",
                    component: './Dashboard/System/Menu'
                  },
                  {
                    path: "/dashboard/system/notice",
                    name: "公告管理",
                    icon: "SoundOutlined",
                    component: './Dashboard/System/Notice',
                  }
                ]
              }
        ],
    },
    {
        path: '/',
        name: '首页',
        icon: 'smile',
        component: '@/layouts/basicLayout',
        wrappers:['@/wrappers/auth'],
        routes: [
            { path: '/', redirect: '/home' },
            {
                path: '/home',
                name: '首页',
                component: './Home',
                wrappers:['@/wrappers/auth'],
            },
            {
                path: '/knowledge',
                name: '知识库',

                routes: [
                    {
                        path: '/knowledge',
                        component: './Knowledge',
                        wrappers:['@/wrappers/auth'],
                    },
                    {
                        path: '/knowledge/:id',
                        component: './Knowledge',
                        wrappers:['@/wrappers/auth'],
                    },
                    {
                        path: '/knowledge/details/:id',
                        component: './Knowledge/Detail',
                        wrappers:['@/wrappers/auth'],
                    },
                ],
            },
            {
                path: '/knowledgeGraph',
                name: '知识图谱',
                component: './knowledgeGraph',
                wrappers:['@/wrappers/auth'],
            },
            {
                path: '/go2dashboard',
                name: '知识管理',
                // access: 'canAdmin',
                redirect: '/dashboard',
            },
            {
                path: '/home3',
                name: '统计分析',
                component: './404',
            },

            {
                path: '/home5',
                name: '联系我们',
                component: './404',
            },
        ],
    },
    {
        component: './404',
    },
];
